package com.smfx.yxt.daoSqlserver;

import java.util.List;
import java.util.Map;

import com.smfx.yxt.model.TeacherInfo;
import com.smfx.yxt.page.Page;
import com.smfx.yxt.reqVo.BaseQueryVO;
import com.smfx.yxt.reqVo.TeacherReqVO;
import com.smfx.yxt.view.TeacherInfoView;

public interface TeacherInfoMapper {

	List<TeacherInfo> selectList();
	
    int insertSelective(TeacherInfo record);

    TeacherInfo selectByPrimaryKey(Integer id);
    
    TeacherInfo selectByOpenid(String openid);

    int updateByPrimaryKeySelective(TeacherInfo record);
    
    int updateUnbindWechat(TeacherInfo record);
    /**
     * 根据版本号修改教师信息
     * @param record
     * @return
     */
    int updateForVersionById(TeacherInfo record);

    TeacherInfo selectForWapLogin(TeacherInfo record);
    
    List<TeacherInfo> selectByPage(Page<TeacherInfo> page);
    
	List<TeacherInfo> selectByParam(TeacherReqVO vo);
	
	List<TeacherInfo> selectForChatByParam(TeacherReqVO vo);
	
	int selectClazzCountByOpenid(String openid);
	
	int selectCountByOpenid(String openid);
	
	List<TeacherInfoView> selectClazzListByOpenid(String openid);
	
	int isClassTeacher(Integer teacherId);
	
	List<TeacherInfoView> selectClassForTeacher(BaseQueryVO vo);
	
	List<TeacherInfo> selectAll(Integer schoolId);
	
	List<TeacherInfo> selectByKeyword(TeacherReqVO reqVO);
	
	/**
	 * 查询学生主班老师信息
	 * @param studentId
	 * @return
	 */
	List<TeacherInfo> selectMainClassListByStudentId(Integer studentId);
	/**
	 * 查询班主任信息
	 * @param map
	 * @return
	 */
	TeacherInfo selectHeadTeacher(Map<String, Object> map);
	
	/**
	 * 查询分组内的老师
	 * @param groupId
	 * @return
	 */
	List<TeacherInfo> selectListForOrganizeGroup(Integer groupId);
	/**
	 * 根据ids查询老师列表
	 * @param list
	 * @return
	 */
	List<TeacherInfo> selectListByIds(List<String> list);
	/**
	 * 根据职位查询老师列表
	 * @param list
	 * @return
	 */
	List<TeacherInfo> selectListByPositionIds(List<String> list);
	/**
	 * 根据维修类别查询维修人员
	 * @param repairType
	 * @return
	 */
	List<TeacherInfo> selectListByRepairType(String repairType);
	
	List<TeacherInfo> selectListForAll(TeacherReqVO vo);
	
	List<TeacherInfo> selectListForCourseId(Integer courseId);
	/**
	 * 查询主科老师
	 * @param vo
	 * @return
	 */
	List<TeacherInfo> selectListForMainSubject(TeacherReqVO vo);
	
	int updateBatchPosition(List<TeacherInfo> list);
}